package contract.sample;

import contract.jvm.Jvm;
import contract.jvm.Reference;

public class SampleContractRun {

    public static void main(String[] args) {
        // 示例合约
        String contractClassName = "contract/sample/SampleContract";
        // 新建Jvm
        Jvm jvm = new Jvm();
        // 新建合约对象
        Reference reference = jvm.newObject(contractClassName);
        // 调用合约方法 SampleContract.println(int counter)
        jvm.runMethod(reference, "println", "(I)V", new Object[]{1024});
    }

}
